{template "content","header"}
 <div id="info"> &gt;
  <a href="" class='navigation_style'>首页</a> &gt;
  <a href="" class='navigation_style'>{$catname}</a>
</div>

<?php
function leftmenu($rootid){
    ?>
    {pc:content action="category" catid="$rootid" siteid="$siteid" order="listorder ASC"}
      {loop $data $r}
      <?php
      if(count($data) == 0){
      return;
      }
      $c = $r['arrchildid'];
      $c = explode(',',$c);
      if(count($c) != 1){
      ?>
      <li onmouseover="displaySubMenu(this)" onmouseout="hideSubMenu(this)">
      <a href="{$r[url]}">{$r[catname]}</a>
      <ul  class="left_submenu">
      <?php menu($r['catid']);?>
      </ul>
      </li>
      <?php
      }else if(count($c) == 1){
      ?>
      <li><a href="{$r[url]}">{$r[catname]}</a></li>
      <?php
      }
      ?>
      {/loop}
      {/pc}
      <?php 
      }
?>
<li style="border-radius: 4px 4px 0 0;width: 190px;list-style:none;
border-bottom: 1px solid white;
background-color: #356CB6;
height: 40px;
line-height: 40px;
text-indent: 2em;font-size:20px;color:#fff;
color: white;
font-weight: bold;
font-size: 20px;">{$catname}</li>
<div class="left_menu">
 <ul>
    <?php leftmenu($catid);?>
</ul>  
</div> 
     
<div id="con_r">
	
  <div class="content">
    <?php $childs = explode(",",$arrchildid);$flag = 0;?>
    <?php
        foreach ($childs as $childid) {
    ?>
        {pc:get sql="SELECT * FROM phpcms_category where `catid` = '$childid'"}
              <?php 
                if($data[0]['catname'] == $catname.'编辑'){
                    $flag = 1;
                  ?>
                  {pc:get sql="SELECT * FROM phpcms_page where `catid` = '$childid'"}
                    {$data[0]['content']}
                  {/pc}
                  <?php
                }
              ?>
        {/pc}
    <?php }?>
    <?php if($flag == 0){?>

          <?php $childs = explode(",",$arrchildid);?>
        {pc:get sql="select * from phpcms_category where catid in($childs[0])" return="data"}
            <?php if($data[0]['type'] == '0'){?>
              <div id="con_r1">
                <h1>{$catname}</h1>
                  <div id="news">
                    <ul id="grid">
                        {pc:content action="lists" catid="$data[0]['catid']" num="15" order="id DESC" page="$page"}

                                  {loop $data $r}
                                    <li>
                                    <span>{date('Y-m-d',$r[inputtime])}</span>
                                    <a href="{$r[url]}" target="_blank"{title_style($r[style])}><?php echo str_cut($r[title],100)?></a>
                                    </li>
                                   <!--  {if $n%5==0}<li class="bk20 hr"style="border-bottom:dashed 1px #ffffff;"></li>{/if} -->
                                  {/loop}

                          <div id="pages" class="text-c">{$pages}</div>
                        {/pc}
                    </ul>
                  </div>
                </div>
            <?php }else{?>
            <?php $c = intval($data[0]['catid']);?>
            {pc:get sql="SELECT * FROM phpcms_page where `catid` = '$c'"}
                      {$data[0]['content']}
              {/pc}
            <?php }?>
        {/pc}

    <?php }?>
  </div>
 </div>
{template "content","footer"}